﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business.IManager;
using Business.Manager;
using Entity;
using System.Data;
namespace OnlinePayment.Home
{
    public partial class AnnouncementView : System.Web.UI.Page
    {
        public static int id;
        public string title;
        public string body;
        AnnouncementManager announcementMannager = new AnnouncementManager();
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                id = Convert.ToInt32(Request.QueryString["id"].ToString());
                if (id!=0)
                {
                    articlebind();
                }
                else
                {
                    id = 1;
                    articlebind();
                }
            }
            catch
            {
                //Response.Write("<script language='javascript'>alert('参数错误！');</script>");
               

            }
        }
        private void articlebind()
        {
            Announcement announcement = announcementMannager.getAnnouncement(id);
            //txtAuthor.Text = announcement.Athour;
            title = announcement.Title;
            body = Server.HtmlDecode(announcement.Content);
            //txtKeyword.Text = announcement.KeyWord;
        }
    }
}